﻿//-----------------------------------------------------------------------
// <copyright file="SR.cs" company="Alan Rodrigues">
//     Copyright (c) Alan Rodrigues. All rights reserved.
// </copyright>
// <developed>Alan Rodrigues (operninha@gmail.com)</developed>
//-----------------------------------------------------------------------

namespace Authorization
{
    using System.Globalization;
    using Properties;

        internal static class SR
        {
            public static string GetString(string name)
            {
                return Resources.ResourceManager.GetString(name, CultureInfo.CurrentCulture);
            }

            public static string GetString(string name, params object[] args)
            {
                var format = Resources.ResourceManager.GetString(name);
                if ((args == null) || (args.Length <= 0))
                {
                    return format;
                }

                for (var i = 0; i < args.Length; i++)
                {
                    var str2 = args[i] as string;
                    if ((str2 != null) && (str2.Length > 0x400))
                    {
                        args[i] = str2.Substring(0, 0x3fd) + "...";
                    }
                }

                return string.Format(CultureInfo.CurrentCulture, format, args);
            }
        }
    }

